package com.sanri.test.testspring.configs;

import com.sanri.test.testspring.custom.Person;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ConfigBean {
    @Value("${spring.application.name}")
    private String appName;

    @Value("#{person}")
    private Person person;

    @Bean
    public Person person(){
        return new Person("sanri",1);
    }
}
